class_name PointerMark
extends Area2D

@onready var animation: AnimationPlayer = $AnimationPlayer

signal player_stopped

var used := false
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	animation.play("blink")
	body_entered.connect(on_body_entered)


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta: float) -> void:
	pass

func on_body_entered(body: Node2D) -> void:
	if body is Ark_Player and not used:
		used = true
		body.controllable = false
		player_stopped.emit()
